{% load catalog_extras %}
<h3>{{ catalog_item.name }}-{{ catalog_item.version }}</h3>
<div class='item_detail'>
<table class='table table-striped table-condensed'>

{% for key, value in catalog_item.items %}
    {% if value|type_is:'array' %}
        {% if value.0|type_is:'dictionary' %}
            {# list of dicts #}
            <tr><th scope="row">{{ key }}</th>
            <td>{% include "catalogs/dict_list.html" with dict_list=value only %}</td></tr>
        {% else %}
            {# list of strings #}
            <tr><th scope="row">{{ key }}</th>
            <td>
                {% for item in value %}
                    {{ item }}
                    {% if not forloop.last %}<br />{% endif %}
                {% endfor %}
            </td></tr>
        {% endif %}
    {% elif value|type_is:'dictionary' %}
        <tr><th scope="row">{{ key }}</th>
        <td>{% include "catalogs/generic_dict.html" with generic_dict=value only %}</td></tr>
    {% elif '_script' in key %}
        {# special case: show scripts in monospaced font #}
        <tr><th scope="row">{{ key }}</th><td class="code">{{ value }}</td></tr>
    {% else %}
        {# regular scalar value #}
        <tr><th scope="row">{{ key }}</th><td>{{ value }}</td></tr>
    {% endif %}
{% endfor %}

</table>
</div>
